<!doctype html>
<html>
<head>
<script>
if (window.testRunner) {
    testRunner.enableAutoResizeMode(10, 10, 1000, 1000);
    testRunner.dumpAsText();
    testRunner.dumpChildFrames();
    testRunner.waitUntilDone();
}

function run()
{
    var frameWindow = window.frames['frame'];
    frameWindow.postMessage("shouldBe('document.scrollingElement.scrollWidth', 400)", "*");
    frameWindow.postMessage("shouldBe('document.scrollingElement.scrollHeight', 200)", "*");
    frameWindow.postMessage("log('DONE'); if (window.testRunner) testRunner.notifyDone();", "*");
}
</script>
</head>
<body onload="run()" style="width:400px; height:200px; background-color:yellow;">
<iframe name="frame" style="width:100%; height:100%;" src="resources/iframe.html">
</iframe>
</body>
</html>
